<template>
  <div class="w-condition-box w-condition-box-root">
    <div>
      <ConditionItem class="w-condition-box-content" v-model="modelValue.condition" :form-items="formItems" />
    </div>
  </div>
</template>

<script>
import { defineComponent } from "vue";
import ConditionItem from "./ConditionItem.vue";

export default defineComponent({
  name: "ConditionConfig",
  components: {
    ConditionItem
  },
  props: {
    formItems: {
      type: Array,
      required: true,
      default: () => []
    },
    modelValue: {
      type: Object,
      default: () => ({
        logic: true,
        name: "",
        condition: {},
        children: []
      })
    }
  }
});
</script>
